<me:PDCBase x:Class="WPFExcelReport.ITXPDCCS"
                    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                    xmlns:local="clr-namespace:ReflectionStudio.Components.UserControls;assembly=ReflectionStudio.Core" 
                    xmlns:ucd="clr-namespace:ReflectionStudio.Controls;assembly=ReflectionStudio.Controls"     
                    xmlns:me="clr-namespace:WPFExcelReport" 
                   Background="White"  
                    Loaded="Window_Loaded"
     >
    <me:PDCBase.Resources> 
        <ucd:PreisConverter  x:Key="PreisConverter"/>
        <ucd:PNumConverter  x:Key="pnum"/>
        <ucd:TextTrimmingConverter  x:Key="Trim"/>
        <ucd:GB2312Convert8859P1  x:Key="gb2312"/>
        <CollectionViewSource   x:Key="vwABPOS" Source="{Binding Path=SetEnv.ABPOS}" />
        <CollectionViewSource   x:Key="vwABFOLGE" Source="{Binding Path=SetEnv.ABFOLGE}" />
        <CollectionViewSource   x:Key="vwTPDC" Source="{Binding Path=SetProd.ICC_PDC}" />
        <CollectionViewSource   x:Key="vwPDC" Source="{Binding Path=SetData.ICC_PDC}" />
    </me:PDCBase.Resources>
    <TabControl>
        <TabItem  Header="{Binding Source={Localization:Translate Word=采集}}" Background="White" Name="tabEdit">
            <Grid>
                <Grid.RowDefinitions>
                    <RowDefinition Height="Auto"></RowDefinition>
                    <RowDefinition Height="1*"></RowDefinition>
                    <RowDefinition Height="3*"></RowDefinition>
                </Grid.RowDefinitions>
                <Grid Grid.Row="0">
                    <Grid.RowDefinitions>
                        <RowDefinition Height="Auto"></RowDefinition>
                        <RowDefinition Height="1*"></RowDefinition>
                    </Grid.RowDefinitions>
                    <StackPanel Grid.Row="0" >
                        <WrapPanel  Margin="10,0,0,0" >
                            <Grid>
                                <Grid.ColumnDefinitions>
                                    <ColumnDefinition Width="Auto"></ColumnDefinition>
                                    <ColumnDefinition Width="Auto"></ColumnDefinition>
                                </Grid.ColumnDefinitions>
                                <TextBlock Grid.Column="0" FontSize="18" Text="{Binding Source={Localization:Translate Word=重置}}"></TextBlock>
                                <Button Grid.Column="1" Height="30" Width="30" Margin="5,0,0,0"  Click="btnResetScreen_Click">
                                    <Button.Background>
                                        <ImageBrush  ImageSource="/ITXPDC;component/Image/Refresh.png" />
                                    </Button.Background>
                                </Button>
                            </Grid> 
                            <Grid Visibility="Collapsed">
                                <Grid.ColumnDefinitions>
                                    <ColumnDefinition Width="Auto"></ColumnDefinition>
                                    <ColumnDefinition Width="Auto"></ColumnDefinition>
                                </Grid.ColumnDefinitions>
                                <TextBlock Margin="10,0,0,0" Grid.Column="4" Text="{Binding Source={Localization:Translate Word=User:}}"></TextBlock>
                                <TextBox Grid.Column="5" Name="txtUser" Width="40">JLTV</TextBox>
                            </Grid>
                            <Grid Visibility="Collapsed">
                                <Grid.ColumnDefinitions>
                                    <ColumnDefinition Width="Auto"></ColumnDefinition>
                                    <ColumnDefinition Width="Auto"></ColumnDefinition>
                                </Grid.ColumnDefinitions>
                                <Button Grid.Column="0" FontSize="18" Height="30" Width="30" Margin="5,0,0,0" Name="btnPrint" Click="btnPrint_Click">
                                    <Button.Background>
                                        <ImageBrush  ImageSource="/ITXPDC;component/Image/Print.png" />                                     
                                    </Button.Background>
                                </Button>
                                <TextBlock Grid.Column="1" Margin="5,0,0,0"  Text="{Binding Source={Localization:Translate Word=打印}}" VerticalAlignment="Center" ></TextBlock>
                            </Grid>
                        </WrapPanel>
                        <WrapPanel  Margin="10,0,0,10">
                            <Grid>
                                <Grid.ColumnDefinitions>
                                    <ColumnDefinition Width="Auto"></ColumnDefinition>
                                    <ColumnDefinition Width="Auto"></ColumnDefinition>
                                </Grid.ColumnDefinitions>
                                <TextBlock FontSize="18" Grid.Column="0" Text="{Binding Source={Localization:Translate Word=终端号:}}"></TextBlock>
                                <TextBlock Grid.Column="1" Foreground="Red"  FontSize="18" Text="{Binding TERMNO, Mode=OneWay}" Width="80" ></TextBlock>
                            </Grid>
                            <Grid  >
                                <Grid.ColumnDefinitions>
                                    <ColumnDefinition Width="Auto"></ColumnDefinition>
                                    <ColumnDefinition Width="Auto"></ColumnDefinition>
                                </Grid.ColumnDefinitions>
                                <TextBlock Grid.Column="0" FontSize="18" Text="{Binding Source={Localization:Translate Word=用户:}}" ></TextBlock>
                                <TextBlock Grid.Column="1"   FontSize="18"  Text="{Binding NEWUSER, Source={StaticResource ResourceKey=vwTPDC}}" Width="100" />
                            </Grid>
                            <Grid   Margin="10,0,0,0" >
                                <Grid.ColumnDefinitions>
                                    <ColumnDefinition Width="Auto"></ColumnDefinition>
                                    <ColumnDefinition Width="Auto"></ColumnDefinition>
                                </Grid.ColumnDefinitions>
                                <TextBlock Grid.Column="0" FontSize="18" Text="{Binding Source={Localization:Translate Word=日期:}}" ></TextBlock>
                                <TextBlock Grid.Column="1"   FontSize="18"  Text="{Binding NEWDATE, Source={StaticResource ResourceKey=vwTPDC}}" Width="Auto" />
                            </Grid>
                            <Grid Margin="10,0,0,0" >
                                <Grid.ColumnDefinitions>
                                    <ColumnDefinition Width="Auto"></ColumnDefinition>
                                    <ColumnDefinition Width="Auto"></ColumnDefinition>
                                </Grid.ColumnDefinitions>
                                <TextBlock Grid.Column="0" FontSize="18" Text="{Binding Source={Localization:Translate Word=时间:}}" ></TextBlock>
                                <TextBlock Grid.Column="1" FontSize="18"  Text="{Binding NEWTIME, Source={StaticResource ResourceKey=vwTPDC}}" Width="60" ></TextBlock>
                            </Grid>
                            <Grid  Margin="10,0,0,0">
                                <Grid.ColumnDefinitions>
                                    <ColumnDefinition Width="Auto"></ColumnDefinition>
                                    <ColumnDefinition Width="Auto"></ColumnDefinition>
                                </Grid.ColumnDefinitions>
                                <TextBlock Grid.Column="0" FontSize="18" Text="{Binding Source={Localization:Translate Word=ID:}}"></TextBlock>
                                <TextBlock Grid.Column="1" Foreground="Red"  FontSize="12" Text="{Binding ABAID, Source={StaticResource ResourceKey=vwTPDC}}" Width="Auto" ></TextBlock>
                            </Grid>
                        </WrapPanel>
                        <WrapPanel  Margin="10,0,0,10">
                            <Grid >
                                <Grid.ColumnDefinitions>
                                    <ColumnDefinition Width="Auto"></ColumnDefinition>
                                    <ColumnDefinition Width="200"></ColumnDefinition>
                                    <ColumnDefinition Width="Auto"></ColumnDefinition>
                                    <ColumnDefinition Width="Auto"></ColumnDefinition>
                                </Grid.ColumnDefinitions>
                                <TextBlock  FontSize="18" Grid.Column="0" Text="{Binding Source={Localization:Translate Word=批次:}}"></TextBlock>
                                <TextBox Background="White" BorderBrush="Black" FontSize="18" Grid.Column="1" Name="txtSPINLOT" CharacterCasing="Upper" KeyUp="txtSPINLOT_KeyUp" Text="{Binding JP10, Source={StaticResource ResourceKey=vwTPDC}}" Width="200" ></TextBox>
                            </Grid>
                            <Grid >
                                <Grid.ColumnDefinitions>
                                    <ColumnDefinition Width="Auto"></ColumnDefinition>
                                    <ColumnDefinition Width="200"></ColumnDefinition>
                                    <ColumnDefinition Width="Auto"></ColumnDefinition>
                                    <ColumnDefinition Width="Auto"></ColumnDefinition>
                                </Grid.ColumnDefinitions>
                                <TextBlock  FontSize="18" Grid.Column="0" Text="{Binding Source={Localization:Translate Word=步骤:}}"></TextBlock>
                                <TextBox Background="White" BorderBrush="Black" FontSize="18" Grid.Column="1" Name="txtABFSTEP" CharacterCasing="Upper" KeyUp="txtABFSTEP_KeyUp" Text="{Binding ABFSTEP, Source={StaticResource ResourceKey=vwTPDC}}" Width="200" ></TextBox>
                            </Grid>
                            <Grid >
                                <Grid.ColumnDefinitions>
                                    <ColumnDefinition Width="Auto"></ColumnDefinition>
                                    <ColumnDefinition Width="Auto"></ColumnDefinition>
                                    <ColumnDefinition Width="Auto"></ColumnDefinition>
                                    <ColumnDefinition Width="Auto"></ColumnDefinition>
                                </Grid.ColumnDefinitions>
                                <TextBlock Grid.Column="0" Margin="10,0,0,0"  Background="LightPink"   FontSize="18"  Text="{Binding ABFAUFKRS, Source={StaticResource ResourceKey=vwTPDC}}" Width="Auto" ></TextBlock>
                                <TextBlock Grid.Column="1" Margin="10,0,0,0"  Background="LightYellow"  FontSize="18"  Text="{Binding ABFAUFLFD, Source={StaticResource ResourceKey=vwTPDC}}" Width="Auto" ></TextBlock>
                                <TextBlock Grid.Column="2" Margin="10,0,0,0" Background="LightBlue"  FontSize="18"  Text="{Binding ABFAUFPOS, Source={StaticResource ResourceKey=vwTPDC}}" Width="Auto" ></TextBlock>
                                <TextBlock Grid.Column="3" Margin="10,0,0,0" Background="LightGreen"  FontSize="18"  Text="{Binding ABFAFOLGE, Source={StaticResource ResourceKey=vwTPDC}}" Width="Auto" ></TextBlock>
                            </Grid>
                        </WrapPanel>
                        <WrapPanel Margin="10,0,0,10">
                            <Grid  >
                                <Grid.ColumnDefinitions>
                                    <ColumnDefinition Width="Auto"></ColumnDefinition>
                                    <ColumnDefinition Width="Auto"></ColumnDefinition>
                                </Grid.ColumnDefinitions>
                                <TextBlock Grid.Column="0" FontSize="18" Text="{Binding Source={Localization:Translate Word=设备:}}" ></TextBlock>
                                <TextBox Grid.Column="1" Name="txtMachineID" CharacterCasing="Upper" BorderBrush="Black" FontSize="18"   KeyUp="txtMACHINE_KeyUp" Text="{Binding MACHINEID, Source={StaticResource ResourceKey=vwTPDC}}" Width="120" ></TextBox>
                            </Grid>
                            <Grid >
                                <Grid.ColumnDefinitions>
                                    <ColumnDefinition Width="Auto"></ColumnDefinition>
                                    <ColumnDefinition Width="Auto"></ColumnDefinition>
                                    <ColumnDefinition Width="Auto"></ColumnDefinition>
                                    <ColumnDefinition Width="Auto"></ColumnDefinition>
                                </Grid.ColumnDefinitions>
                                <TextBlock Grid.Column="1" Margin="10,0,0,0" Background="LightPink" FontSize="18"  Text="{Binding ABFIMNRKRS, Source={StaticResource ResourceKey=vwTPDC}}" Width="30" ></TextBlock>
                                <TextBlock Grid.Column="2" Margin="10,0,0,0" Background="LightYellow"   FontSize="18"  Text="{Binding ABFIMLFDNR, Source={StaticResource ResourceKey=vwTPDC}}" Width="60" ></TextBlock>
                                <TextBlock Grid.Column="3" Margin="10,0,0,0" Background="LightBlue"  FontSize="18"  Text="{Binding ABFIMPOS, Source={StaticResource ResourceKey=vwTPDC}}" Width="30" ></TextBlock>
                            </Grid>
                            <Grid  >
                                <Grid.ColumnDefinitions>
                                    <ColumnDefinition Width="Auto"></ColumnDefinition>
                                    <ColumnDefinition Width="Auto"></ColumnDefinition>
                                </Grid.ColumnDefinitions>
                                <TextBlock Grid.Column="0" FontSize="18" Text="{Binding Source={Localization:Translate Word=数量:}}" ></TextBlock>
                                <TextBox Grid.Column="1" Name="txtQty" CharacterCasing="Upper" BorderBrush="Black" FontSize="18"  Text="{Binding QTY, Source={StaticResource ResourceKey=vwTPDC}}" Width="80" ></TextBox>
                            </Grid>
                            <Grid  >
                                <Grid.ColumnDefinitions>
                                    <ColumnDefinition Width="Auto"></ColumnDefinition>
                                    <ColumnDefinition Width="Auto"></ColumnDefinition>
                                </Grid.ColumnDefinitions>
                                <TextBlock Grid.Column="0" FontSize="18" Text="{Binding Source={Localization:Translate Word=挡车工:}}" ></TextBlock>
                                <TextBox Grid.Column="1"   FontSize="18"  Text="{Binding PDCSTAFF, Source={StaticResource ResourceKey=vwTPDC}}" Width="120" />
                            </Grid>
                            <Grid>
                                <Grid.ColumnDefinitions>
                                    <ColumnDefinition Width="Auto"></ColumnDefinition>
                                    <ColumnDefinition Width="Auto"></ColumnDefinition>
                                </Grid.ColumnDefinitions>
                                <TextBlock Grid.Column="0" FontSize="18" Text="{Binding Source={Localization:Translate Word=班次:}}"></TextBlock>
                                <TextBox Grid.Column="1" Foreground="Red"  FontSize="18" Text="{Binding PDCSHIFT, Source={StaticResource ResourceKey=vwTPDC}}" Width="40" />
                            </Grid>
                        </WrapPanel>
                        <WrapPanel Margin="10,0,0,10">                             
                        </WrapPanel>
                        <WrapPanel  Margin="10,0,0,10">
                            <Grid>
                                <Grid.ColumnDefinitions>
                                    <ColumnDefinition Width="Auto"/>
                                    <ColumnDefinition Width="Auto"/> 
                                </Grid.ColumnDefinitions>
                                <Button Grid.Column="0"  Margin="20,0,0,0" FontSize="18"  Width="Auto" Height="Auto" Click="Start_Click" Content="{Binding Source={Localization:Translate Word=上机}}" />
                                <Button Grid.Column="1"  Margin="20,0,0,0" FontSize="18"   Width="Auto" Height="Auto" Click="End_Click" Content="{Binding Source={Localization:Translate Word=下机}}" />
                            </Grid>
                            <Grid  >
                                <Grid.ColumnDefinitions>
                                    <ColumnDefinition Width="Auto"></ColumnDefinition>
                                    <ColumnDefinition Width="Auto"></ColumnDefinition>
                                </Grid.ColumnDefinitions>
                                <TextBlock Grid.Column="0" FontSize="18" Text="{Binding Source={Localization:Translate Word=发生日期:}}" ></TextBlock>
                                <TextBox Grid.Column="1"   FontSize="18"  Text="{Binding PDCDATE, Source={StaticResource ResourceKey=vwTPDC}}" Width="120" />
                            </Grid>
                            <Grid  >
                                <Grid.ColumnDefinitions>
                                    <ColumnDefinition Width="Auto"></ColumnDefinition>
                                    <ColumnDefinition Width="Auto"></ColumnDefinition>
                                    <ColumnDefinition Width="Auto"></ColumnDefinition>
                                    <ColumnDefinition Width="Auto"></ColumnDefinition>
                                    <ColumnDefinition Width="Auto"></ColumnDefinition>
                                    <ColumnDefinition Width="Auto"></ColumnDefinition>
                                </Grid.ColumnDefinitions>
                                <TextBlock Grid.Column="0" FontSize="18" Text="{Binding Source={Localization:Translate Word=开始:}}" ></TextBlock>
                                <TextBox Grid.Column="1" FontSize="18"  Text="{Binding PDCTIMES, Source={StaticResource ResourceKey=vwTPDC}}" Width="60" />
                                <TextBlock Grid.Column="2" FontSize="18" Text="{Binding Source={Localization:Translate Word=结束}}" ></TextBlock>
                                <TextBox Grid.Column="3" FontSize="18"  Text="{Binding PDCTIMET, Source={StaticResource ResourceKey=vwTPDC}}" Width="60" />
                                <TextBlock Grid.Column="4" FontSize="18" Text="{Binding Source={Localization:Translate Word=分钟数}}" ></TextBlock>
                                <TextBox Grid.Column="5" FontSize="18"  Text="{Binding PDCTIME, Source={StaticResource ResourceKey=vwTPDC}}" Width="40" />
                            </Grid>
     
                            <Grid>
                                <Grid.ColumnDefinitions>
                                    <ColumnDefinition Width="Auto"></ColumnDefinition>
                                    <ColumnDefinition Width="Auto"></ColumnDefinition>
                                </Grid.ColumnDefinitions>
                                <TextBlock Grid.Column="0" FontSize="18"  Text="{Binding Source={Localization:Translate Word=OK}}"></TextBlock>
                                <Button Grid.Column="1" Height="30" Width="30" Margin="0,0,0,0"  Name="btnOK"  Click="btnConfirmLine_Click">
                                    <Button.Background>
                                        <ImageBrush  ImageSource="/ITXPDC;component/Image/button_ok.png" /> 
                                    </Button.Background>
                                </Button>
                            </Grid>
                        </WrapPanel>
                    </StackPanel>
                </Grid>
                <TabControl Grid.Row="1" Grid.Column="0">
                    <TabItem Header="{Binding Source={Localization:Translate Word=细纱采集}}" Name="XSPDC"  Visibility="Collapsed">
                        <Grid>
                            <Grid.RowDefinitions>
                                <RowDefinition Height="Auto"></RowDefinition>
                                <RowDefinition Height="1*"></RowDefinition>
                            </Grid.RowDefinitions>
                            <WrapPanel>
                                <Grid>
                                    <Grid.ColumnDefinitions>
                                        <ColumnDefinition Width="Auto"></ColumnDefinition>
                                        <ColumnDefinition Width="Auto"></ColumnDefinition>
                                    </Grid.ColumnDefinitions>
                                    <TextBlock Grid.Column="0" FontSize="18" Text="{Binding Source={Localization:Translate Word=纱支:}}" ></TextBlock>
                                    <TextBlock Grid.Column="1" FontSize="18"  Text="{Binding JP01, Source={StaticResource ResourceKey=vwTPDC}}" Width="40" />
                                </Grid>
                                <Grid  >
                                    <Grid.ColumnDefinitions>
                                        <ColumnDefinition Width="Auto"></ColumnDefinition>
                                        <ColumnDefinition Width="Auto"></ColumnDefinition>
                                    </Grid.ColumnDefinitions>
                                    <TextBlock Grid.Column="0" FontSize="18" Text="{Binding Source={Localization:Translate Word=锭数:}}" ></TextBlock>
                                    <TextBox Grid.Column="1" Name="txtSpindles"  CharacterCasing="Upper" BorderBrush="Black" FontSize="18"  Text="{Binding JP02, Source={StaticResource ResourceKey=vwTPDC}}" Width="60" ></TextBox>
                                </Grid>
                                <Grid  >
                                    <Grid.ColumnDefinitions>
                                        <ColumnDefinition Width="Auto"></ColumnDefinition>
                                        <ColumnDefinition Width="Auto"></ColumnDefinition>
                                        <ColumnDefinition Width="Auto"></ColumnDefinition>
                                        <ColumnDefinition Width="Auto"></ColumnDefinition>
                                        <ColumnDefinition Width="Auto"></ColumnDefinition>
                                        <ColumnDefinition Width="Auto"></ColumnDefinition>
                                        <ColumnDefinition Width="Auto"></ColumnDefinition>
                                        <ColumnDefinition Width="Auto"></ColumnDefinition>
                                    </Grid.ColumnDefinitions>
                                    <TextBlock Grid.Column="2" FontSize="18" Text="{Binding Source={Localization:Translate Word=亨司表:}}" ></TextBlock>
                                    <TextBox Grid.Column="3" Name="txtSPINHS"  BorderBrush="Black" FontSize="18"  KeyUp="txtSPINHS_KeyUp" Text="{Binding  JP03, Source={StaticResource ResourceKey=vwTPDC}}" Width="80" ></TextBox>
                                    <TextBlock Grid.Column="4" FontSize="18" Text="{Binding Source={Localization:Translate Word=上次:}}" ></TextBlock>
                                    <TextBox Grid.Column="5"   BorderBrush="Black" FontSize="18"  Text="{Binding AMAUFTRVON, Source={StaticResource ResourceKey=vwTPDC}}" Width="60" />
                                    <TextBlock Grid.Column="6" FontSize="18" Text="{Binding Source={Localization:Translate Word=最大:}}" ></TextBlock>
                                    <TextBlock Grid.Column="7"  FontSize="18" Text="{Binding AMAUFTRBIS, Source={StaticResource ResourceKey=vwTPDC}}" Width="Auto" MinWidth="80" />
                                </Grid>
                                <Grid>
                                    <Grid.ColumnDefinitions>
                                        <ColumnDefinition Width="Auto"></ColumnDefinition>
                                        <ColumnDefinition Width="Auto"></ColumnDefinition>
                                    </Grid.ColumnDefinitions>
                                    <TextBlock Grid.Column="0" FontSize="18" Text="{Binding Source={Localization:Translate Word=米数:}}" ></TextBlock>
                                    <TextBox Grid.Column="1"   BorderBrush="Black" FontSize="18"  KeyUp="txtMTERS_KeyUp"  Text="{Binding JP06, Source={StaticResource ResourceKey=vwTPDC}}" Width="60" />
                                </Grid>
                            </WrapPanel>
                        </Grid>
                    </TabItem>
                    <TabItem Header="{Binding Source={Localization:Translate Word=粗纱采集}}" Name="CSPDC" Visibility="Collapsed">
                    </TabItem>
                </TabControl>
                <Grid Grid.Row="2"   Grid.Column="1">
                    <Grid.RowDefinitions>
                        <RowDefinition Height="Auto"></RowDefinition>
                        <RowDefinition Height="1*"></RowDefinition>
                    </Grid.RowDefinitions>
                    <WrapPanel>
                        <Grid Visibility="Collapsed">
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="Auto"/>
                                <ColumnDefinition Width="Auto"/>
                                <ColumnDefinition Width="Auto"/>
                            </Grid.ColumnDefinitions>
                            <TextBlock Grid.Column="0"  Margin="20,0,0,0" VerticalAlignment="Center" HorizontalAlignment="Center" FontSize="18"  Text="{Binding Source={Localization:Translate Word=删除}}"></TextBlock>
                            <Button Grid.Column="1"  Margin="20,0,0,0"  Width="40" Height="40" Click="Del_Click"  >
                                <Button.Background>
                                    <ImageBrush  ImageSource="/ITXPDC;component/Image/Delete.png" /> 
                                </Button.Background>
                            </Button>
                        </Grid>
                        <Grid>
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="Auto"/>
                                <ColumnDefinition Width="Auto"/>
                                <ColumnDefinition Width="Auto"/>
                            </Grid.ColumnDefinitions>
                            <TextBlock Grid.Column="0"  Margin="20,0,0,0" VerticalAlignment="Center" HorizontalAlignment="Center" FontSize="18"  Text="{Binding Source={Localization:Translate Word=修改时需要保存}}"></TextBlock>
                            <Button Grid.Column="2"  Margin="20,0,0,0"  Width="40" Height="40" Click="ReTry_Click"  >
                                <Button.Background>
                                    <ImageBrush  ImageSource="/ITXPDC;component/Image/Save.png" />                                     
                                </Button.Background>
                            </Button>
                        </Grid>
                    </WrapPanel>
                    <DataGrid  Grid.Row="1"  VerticalAlignment="Top"  
                                   AutoGenerateColumns="False"
                                   EnableRowVirtualization="False"
                                   VerticalScrollBarVisibility="Auto"
                                   HorizontalScrollBarVisibility="Auto"
                                   HeadersVisibility="Column"     
                                   ItemsSource="{Binding Source={StaticResource ResourceKey=vwTPDC}}"  
                                   x:Name="dlgVKP"  
                                   RowDetailsVisibilityMode="Visible" Grid.ColumnSpan="2" Margin="0,0.2,0.2,0"
                    >
                        <DataGrid.Columns>
                            <DataGridTextColumn Binding="{Binding Path=ID}" Header="ID"  Width="Auto" />
                            <DataGridTextColumn Binding="{Binding Path=JP10}" Header="纺批"  Width="Auto" />
                            <DataGridTextColumn Binding="{Binding Path=PROCESSED}" Header="P"  Width="Auto" />
                            <DataGridTextColumn Binding="{Binding Path=ABFAUFKRS}" Header=""  Width="Auto" />
                            <DataGridTextColumn Binding="{Binding Path=ABFAUFLFD}" Header="生产单"  Width="Auto" />
                            <DataGridTextColumn Binding="{Binding Path=ABFAUFPOS}" Header=""  Width="Auto" />
                            <DataGridTextColumn Binding="{Binding Path=ABFAFOLGE}" Header="步骤号"  Width="Auto" />
                            <DataGridTextColumn Binding="{Binding Path=ABFAGANG}" Header="加工"  Width="Auto" />
                            <DataGridTextColumn Binding="{Binding Path=ABFBZAGANG, Converter={StaticResource ResourceKey=Trim}}" Header="加工"  Width="Auto" />
                            <DataGridTextColumn Binding="{Binding Path=PDCDATE}" Header="操做日期"  Width="Auto" />
                            <DataGridTextColumn Binding="{Binding Path=PDCTIME}" Header="时间"  Width="Auto" />
                            <DataGridTextColumn Binding="{Binding Path=PDCSTAFF}" Header="挡车工"  Width="Auto" />
                            <DataGridTextColumn Binding="{Binding Path=PDCSHIFT}" Header="班次"  Width="Auto" />
                            <DataGridTextColumn Binding="{Binding Path=QTY}" Header="数量"  Width="Auto" />
                            <DataGridTextColumn Binding="{Binding Path=JP01}" Header="支书"  Width="Auto" />
                            <DataGridTextColumn Binding="{Binding Path=JP02}" Header="锭数"  Width="Auto" />
                            <DataGridTextColumn Binding="{Binding Path=JP03}" Header="读数"  Width="Auto" />
                            <DataGridTextColumn Binding="{Binding Path=JP04}" Header="上次"  Width="Auto" />
                            <DataGridTextColumn Binding="{Binding Path=JP05}" Header="最大"  Width="Auto" />
                        </DataGrid.Columns>
                    </DataGrid  >
                </Grid>
            </Grid>
        </TabItem>
        <TabItem Header="{Binding Source={Localization:Translate Word=管理}}" Background="White">
            <Grid>
                <Grid.RowDefinitions>
                    <RowDefinition Height="Auto"></RowDefinition>
                    <RowDefinition Height="1*"></RowDefinition>
                    <RowDefinition Height="1*"></RowDefinition>
                </Grid.RowDefinitions>
                <WrapPanel Grid.Row="0"  Margin="0,0,0,0">
                    <Grid>
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="Auto">
                            </ColumnDefinition>
                            <ColumnDefinition Width="Auto">
                            </ColumnDefinition>
                        </Grid.ColumnDefinitions>
                        <TextBlock Grid.Column="0"
                                    VerticalAlignment="Center" HorizontalAlignment="Center"   Text="{Binding Source={Localization:Translate Word=装载}}"></TextBlock>
                        <Button Grid.Column="1" Width="20" Height="20" Margin="20,0,0,0" Click="Load_Click" >
                            <Button.Background>
                                <ImageBrush  ImageSource="/ITXPDC;component/Image/Refresh.png" /> 
                            </Button.Background>
                        </Button>
                    </Grid>
                    <Grid>
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="Auto"/>
                            <ColumnDefinition Width="Auto"/>
                            <ColumnDefinition Width="Auto"/>
                        </Grid.ColumnDefinitions>
                        <TextBlock Grid.Column="0"  Margin="20,0,0,0" HorizontalAlignment="Center"   Text="{Binding Source={Localization:Translate Word=生产单}}"></TextBlock>
                        <TextBox Grid.Column="1"  Margin="20,0,0,0"  Name="txtKRS" CharacterCasing="Upper"  Width="40"  ></TextBox>
                        <TextBox Grid.Column="2"  Margin="20,0,0,0"  Name="txtLFD" CharacterCasing="Upper"  Width="80" ></TextBox>
                    </Grid>
                    <Grid>
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="Auto"/>
                            <ColumnDefinition Width="Auto"/>
                            <ColumnDefinition Width="Auto"/>
                        </Grid.ColumnDefinitions>
                        <TextBlock Grid.Column="0"  Margin="20,0,0,0" HorizontalAlignment="Center"   Text="{Binding Source={Localization:Translate Word=录入日期}}"></TextBlock>
                        <TextBox Grid.Column="1"  Margin="20,0,0,0"  Name="txtDateS" CharacterCasing="Upper"  Width="80"  ></TextBox>
                        <TextBox Grid.Column="2"  Margin="20,0,0,0"  Name="txtDateE" CharacterCasing="Upper"  Width="80" ></TextBox>
                    </Grid>
                    <Grid>
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="Auto"/>
                            <ColumnDefinition Width="Auto"/>
                        </Grid.ColumnDefinitions>
                        <TextBlock Grid.Column="0"  Margin="20,0,0,0" 
                                    VerticalAlignment="Center" HorizontalAlignment="Center"   Text="{Binding Source={Localization:Translate Word=品种}}"></TextBlock>
                        <TextBox Grid.Column="1"  Margin="20,0,0,0"  Name="txtART" CharacterCasing="Upper"  Width="100" Height="30"></TextBox>

                    </Grid>
                    <Grid>
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="Auto"/>
                            <ColumnDefinition Width="Auto"/>
                        </Grid.ColumnDefinitions>
                        <Button Grid.Column="0"  Margin="20,0,0,0"  Width="20" Height="20" Click="btnFilter_Click">
                            <Button.Background>
                                <ImageBrush  ImageSource="/ITXPDC;component/Image/Search.png" /> 
                            </Button.Background>
                        </Button>
                        <Button Grid.Column="1"   Click="btnFilterClear_Click">Clear</Button>
                    </Grid>

                    <Grid>
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="Auto">
                            </ColumnDefinition>
                            <ColumnDefinition Width="Auto">
                            </ColumnDefinition>
                            <ColumnDefinition Width="Auto">
                            </ColumnDefinition>
                        </Grid.ColumnDefinitions>
                        <TextBlock Grid.Column="0"  Margin="20,0,0,0" 
                                    VerticalAlignment="Center" HorizontalAlignment="Center"   Text="{Binding Source={Localization:Translate Word=来单日期}}"></TextBlock>
                        <ComboBox Grid.Column="1"  IsEditable="True" Name="cmbNDate" Width="100" Height="30"></ComboBox>
                    </Grid>
                    <Button FontSize="18" Height="20" Width="20" Margin="5,0,0,0"  Click="btnPrint_Click">
                        <Button.Background>
                            <ImageBrush  ImageSource="/ITXPDC;component/Image/Print.png" /> 
                        </Button.Background>
                    </Button>
                    <TextBlock Margin="5,0,0,0"  Text="{Binding Source={Localization:Translate Word=打印}}" VerticalAlignment="Center" ></TextBlock>
                </WrapPanel>
                <DataGrid Grid.Row="1"
                    VerticalAlignment="Top"  
                                   AutoGenerateColumns="False"
                                   EnableRowVirtualization="False"
                                   VerticalScrollBarVisibility="Auto"
                                   HorizontalScrollBarVisibility="Auto"
                                   HeadersVisibility="Column"                 
                                   HorizontalAlignment="Stretch"   
                          Name="dlgNOrders"
                                   ItemsSource="{Binding Source={StaticResource ResourceKey=vwPDC}}"                                 
                                   Margin="0,0,0,0"             
                                   RowDetailsVisibilityMode="Visible" 
                    >
                    <DataGrid.Columns>
                        <DataGridTextColumn Binding="{Binding Path=ID}" Header="ID"  Width="Auto" />
                        <DataGridTextColumn Binding="{Binding Path=PROCESSED}" Header="P"  Width="Auto" />
                        <DataGridTextColumn Binding="{Binding Path=ABFAUFKRS}" Header=""  Width="Auto" />
                        <DataGridTextColumn Binding="{Binding Path=ABFAUFLFD}" Header="生产单"  Width="Auto" />
                        <DataGridTextColumn Binding="{Binding Path=ABFAUFPOS}" Header=""  Width="Auto" />
                        <DataGridTextColumn Binding="{Binding Path=ABFAFOLGE}" Header="步骤号"  Width="Auto" />
                        <DataGridTextColumn Binding="{Binding Path=ABFAGANG}" Header="加工"  Width="Auto" />
                        <DataGridTextColumn Binding="{Binding Path=ABFBZAGANG, Converter={StaticResource ResourceKey=Trim}}" Header="加工"  Width="Auto" />
                        <DataGridTextColumn Binding="{Binding Path=PDCDATE}" Header="操做日期"  Width="Auto" />
                        <DataGridTextColumn Binding="{Binding Path=PDCTIME}" Header="时间"  Width="Auto" />
                        <DataGridTextColumn Binding="{Binding Path=PDCSTAFF}" Header="挡车工"  Width="Auto" />
                        <DataGridTextColumn Binding="{Binding Path=PDCSHIFT}" Header="班次"  Width="Auto" />
                        <DataGridTextColumn Binding="{Binding Path=QTY}" Header="数量"  Width="Auto" />
                        <DataGridTextColumn Binding="{Binding Path=JP01}" Header="支书"  Width="Auto" />
                        <DataGridTextColumn Binding="{Binding Path=JP02}" Header="锭数"  Width="Auto" />
                        <DataGridTextColumn Binding="{Binding Path=JP03}" Header="读数"  Width="Auto" />
                        <DataGridTextColumn Binding="{Binding Path=JP04}" Header="上次"  Width="Auto" />
                        <DataGridTextColumn Binding="{Binding Path=JP05}" Header="最大"  Width="Auto" />
                    </DataGrid.Columns>
                </DataGrid  >
                <Grid Grid.Row="2">
                    <Grid.RowDefinitions>
                        <RowDefinition Height="Auto"></RowDefinition>
                        <RowDefinition Height="1*"></RowDefinition>
                    </Grid.RowDefinitions>
                    <WrapPanel Grid.Row="0">
                        <Grid>
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="Auto">
                                </ColumnDefinition>
                                <ColumnDefinition Width="54">
                                </ColumnDefinition>
                                <ColumnDefinition Width="6"/>
                            </Grid.ColumnDefinitions>
                            <TextBlock Grid.Column="0"  Margin="20,12,0,12" 
                                    VerticalAlignment="Center" HorizontalAlignment="Center"   Text="{Binding Source={Localization:Translate Word=编辑}}"></TextBlock>
                            <Button Grid.Column="1"  Margin="20,0,0,0"  Width="40" Height="40" Click="Edit_Click" Grid.ColumnSpan="2" >
                                <Button.Background>
                                    <ImageBrush  ImageSource="/ITXPDC;component/Image/Open.png" /> 
                                </Button.Background>
                            </Button>
                        </Grid>
                    </WrapPanel>
                    <DataGrid  Grid.Row="1"   VerticalAlignment="Top"  
                                   AutoGenerateColumns="False"
                                   EnableRowVirtualization="False"
                                   VerticalScrollBarVisibility="Auto"
                                   HorizontalScrollBarVisibility="Auto"
                                   HeadersVisibility="Column"     
                                   ItemsSource="{Binding Source={StaticResource ResourceKey=vwTPDC}}"    
                                   RowDetailsVisibilityMode="Visible"
                    >
                        <DataGrid.Columns>
                            <DataGridTextColumn Binding="{Binding Path=ID}" Header="ID"  Width="Auto" />
                            <DataGridTextColumn Binding="{Binding Path=PROCESSED}" Header="P"  Width="Auto" />
                            <DataGridTextColumn Binding="{Binding Path=ABFAUFKRS}" Header=""  Width="Auto" />
                            <DataGridTextColumn Binding="{Binding Path=ABFAUFLFD}" Header="生产单"  Width="Auto" />
                            <DataGridTextColumn Binding="{Binding Path=ABFAUFPOS}" Header=""  Width="Auto" />
                            <DataGridTextColumn Binding="{Binding Path=ABFAFOLGE}" Header="步骤号"  Width="Auto" />
                            <DataGridTextColumn Binding="{Binding Path=ABFAGANG}" Header="加工"  Width="Auto" />
                            <DataGridTextColumn Binding="{Binding Path=ABFBZAGANG, Converter={StaticResource ResourceKey=Trim}}" Header="加工"  Width="Auto" />
                            <DataGridTextColumn Binding="{Binding Path=PDCDATE}" Header="操做日期"  Width="Auto" />
                            <DataGridTextColumn Binding="{Binding Path=PDCTIME}" Header="时间"  Width="Auto" />
                            <DataGridTextColumn Binding="{Binding Path=PDCSTAFF}" Header="挡车工"  Width="Auto" />
                            <DataGridTextColumn Binding="{Binding Path=PDCSHIFT}" Header="班次"  Width="Auto" />
                            <DataGridTextColumn Binding="{Binding Path=QTY}" Header="数量"  Width="Auto" />
                            <DataGridTextColumn Binding="{Binding Path=JP01}" Header="支书"  Width="Auto" />
                            <DataGridTextColumn Binding="{Binding Path=JP02}" Header="锭数"  Width="Auto" />
                            <DataGridTextColumn Binding="{Binding Path=JP03}" Header="读数"  Width="Auto" />
                            <DataGridTextColumn Binding="{Binding Path=JP04}" Header="上次"  Width="Auto" />
                            <DataGridTextColumn Binding="{Binding Path=JP05}" Header="最大"  Width="Auto" />
                        </DataGrid.Columns>
                    </DataGrid  >
                </Grid>
            </Grid>
        </TabItem> 
    </TabControl>
</me:PDCBase>
